<template>
  <div>
    <van-row>
      <van-col span="6"><yangone /></van-col>
      <van-col span="18">
        <van-row>
          <van-col span="24">
            <yangtwo />
          </van-col>
        </van-row>
        <van-row>
          <van-uploader :after-read="upload" />导入
          <treecompany @changepid="getpid" />
          <van-search
            v-model="value"
            show-action
            label="输入内容"
            placeholder="请输入搜索关键词"
            @search="onSearch"

          >
            <template #action>
              <div @click="onSearch">查找</div>
            </template>
          </van-search>
        </van-row>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import axios from "axios";
import yangone from "@/components/yangone";
import yangtwo from "@/components/yangtwo";
import treecompany from "@/components/treecompany";
export default {
  components: {
    yangtwo: yangtwo,
    yangone: yangone,
    treecompany: treecompany,
  },
  name: "zhuone",
  data() {
    return {
      pid: 0,
      value:'',
    };
  },
  methods: {
    upload(file) {
      let formData = new FormData();
      formData.append("file", file.file);
      axios({ url: "upload", method: "post", data: formData }).then((res) => {
        console.log(res);
      });
    },
    onSearch(){
      axios({url:"",method:"get",params:"value"}).then(res=>{
        console.log(res)
      })

    },

    getpid(id) {
      alert(id);
    },
  },
  mounted() {},
};
</script>

<style scoped></style>
